<?php
require_once('db.php');
unset($_POST['submit']);

pr($_POST);

$insertQuery = "INSERT INTO `users` SET";

foreach ($_POST as $colName=>$value)
{
  $insertQuery .=" `$colName`='$value',";
}

$date = date('Y-m-d H:i:s');
$insertQuery .=" `register_date`='$date',
`status` = '0' ";

pr($insertQuery);
mysql_query($insertQuery) or die(mysql_error());


echo '<br>User Added on Id : '.mysql_insert_id();
